package net.towee.client.event.core;

import net.towee.model.group.GroupData;

import com.google.gwt.event.shared.GwtEvent;

public class GroupCreatedEvent extends GwtEvent<GroupCreatedHandler> {
	public static Type<GroupCreatedHandler> TYPE = new Type<GroupCreatedHandler>();
	private final GroupData group;
	
	public GroupCreatedEvent(GroupData result) {
		this.group = result;
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<GroupCreatedHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(GroupCreatedHandler handler) {
		handler.onGroupCreated(group);
	}

}
